<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        分支嵌套
        if(条件语句) {
            if(条件语句) {
                代码块
            }else{

            }
        }else{

        }
     -->

     <script>
        //   1、迎五一，某加油站特推出回馈客户的活动，每逢周五优惠，92号汽油每升优惠3毛，95号汽油每升优惠5毛（92号汽油原价 6.78元/升，95号汽油原价：7.28元/升）根据车主的加油量，计算客户的油费

        var week = prompt('今天是周几?')
        var you = prompt('您要加几号油?');
        var num = prompt('您要加几升?');
        var you1 = 6.78;
        var you2 = 7.28;

        if(week == 5) {
            if(you == 1) {
                var money = (you1 - 0.3) * num;
                alert(money);
            }else{
                var money = (you2 - 0.5) * num;
                alert(money);
            }
        }else{
            if(you == 1) {
                var money = you1 * num;
                alert(money);
            }else{
                var money = you2 * num;
                alert(money);
            }
        }

     </script>
</body>
</html>